package com.liuyun.sunadmin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class MainController {

    @RequestMapping("welcome")
    public String welcome(){
        return "welcome";
    }


    @RequestMapping("main")
    public String main(HttpSession session){
        if (session.getAttribute("user")==null){
            return "redirect:index";
        }
        return "main";
    }


    @RequestMapping("index")
    public String index(){
        return "index";
    }


}
